package com.codeyang.controller;

import com.codeyang.domain.IndexImg;
import com.codeyang.service.IndexImgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 描述:
 * ---远程轮播图接口
 *
 * @author CodeYang_Site
 * @version 2021/5/28 21:57
 */
@Api(tags = "轮播图管理接口")
@RestController
@RequestMapping("admin/indexImg")
public class RemotelyIndexController {


    @Autowired
    private IndexImgService indexImgService;


    @GetMapping("indexImgs")
    @ApiOperation("获取轮播图")
    public ResponseEntity<List<IndexImg>> loadFrontCarousel() {
        List<IndexImg> indexImages = indexImgService.loadFrontCarousel();
        return ResponseEntity.ok(indexImages);
    }
}
